//
//  ForumNoCell.m
//  Pacific_Computer
//
//  Created by 范琦 on 14-12-24.
//  Copyright (c) 2014年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "ForumNoCell.h"
#import "UIColor+AddColor.h"

@implementation ForumNoCell
- (void)dealloc
{
    [_title release];
    [_messge release];
    [_date release];
    [_floor release];
    [_view1 release];
    [super dealloc];
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.title = [[UILabel alloc]init];
        [self.contentView addSubview:self.title];
        [_title release];
        
        self.messge = [[UILabel alloc]init];
        [self.contentView addSubview:self.messge];
        [_messge release];
        
        self.date = [[UILabel alloc]init];
        [self.contentView addSubview:self.date];
        [_date release];
        
        self.floor = [[UILabel alloc]init];
        [self.contentView addSubview:self.floor];
        [_floor release];
        
        self.view1 = [[UIView alloc]init];
        self.view1.backgroundColor = [UIColor huiseColor];
        [self.contentView addSubview:self.view1];
        [_view1 release];
        
        
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    self.title.frame = CGRectMake(5, 5, self.contentView.bounds.size.width - 10, self.contentView.bounds.size.height / 3);
    self.title.numberOfLines = 0;
    self.title.font = [UIFont systemFontOfSize:15];
    
    self.messge.frame = CGRectMake(5, self.title.frame.origin.y + self.title.bounds.size.height, self.contentView.bounds.size.width - 10, self.contentView.bounds.size.height / 3 + 20);
    self.messge.numberOfLines = 0;
    self.messge.font = [UIFont systemFontOfSize:13];
    
    self.date.frame = CGRectMake(5, self.messge.frame.origin.y + self.messge.bounds.size.height, self.contentView.bounds.size.width / 2, self.contentView.bounds.size.height / 4 - 20);
    self.date.font = [UIFont systemFontOfSize:11];
    self.floor.frame = CGRectMake(5 + self.date.bounds.size.width, self.messge.frame.origin.y + self.messge.bounds.size.height, self.contentView.bounds.size.width / 2 - 10, self.contentView.bounds.size.height / 4 - 20);
    self.floor.font = [UIFont systemFontOfSize:11];
    
    self.view1.frame = CGRectMake(0, self.date.frame.origin.y + self.date.bounds.size.height, self.contentView.bounds.size.width, self.contentView.bounds.size.height / 4 - 20);
    

}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
